{% extends "FOSUserBundle::layout.html.twig" %}

{% block fos_user_content %}
{% if error %}
<div>{{ error|trans({}, 'FOSUserBundle') }}</div>
{% endif %}
<form class="form-horizontal" action="{{ path("fos_user_security_check") }}" method="post" id="loginForm" >
    <input type="hidden" name="_csrf_token" value="{{ csrf_token }}" />
    <div class="form-row row-fluid">
        <div class="span12">
            <div class="row-fluid">
                <label class="form-label span12" for="username">
                    Login
                    </label>
                    <input class="span12" type="text" id="username" name="_username" value="{{ last_username }}"  />
                </div>
            </div>
        </div>

        <div class="form-row row-fluid">
            <div class="span12">
                <div class="row-fluid">
                    <label class="form-label span12" for="password">
                        Mot de passe
                        </label>
                        <input class="span12" type="password" id="password" name="_password" />
                    </div>
                </div>
            </div>
            <div class="form-row row-fluid">
                <div class="span12">
                    <div class="row-fluid">
                        <label class="form-label span12" for="password">
                            Departement
                        </label>
{{ render(controller('GdsUserBundle:User:getAllDepartement')) }}
                    </div>
                </div>
            </div>
            <div class="form-row row-fluid">                       
                <div class="span12">
                    <div class="row-fluid">
                        <div class="form-actions">
                            <div class="span12 controls">
                                <button type="submit" name="_submit" class="btn btn-info right" id="_submit"><span class="icon16 icomoon-icon-enter white"></span> Connexion</button>
                            </div>
                        </div>
                    </div>
                </div> 
            </div>

        </form>
{% endblock fos_user_content %}
